package com.cy.study.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cy.study.entity.NewsEntity;
import com.cy.study.req.NewsPageReq;
import com.cy.study.res.NewsPageRes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface NewsMapper extends BaseMapper<NewsEntity> {
    Page<NewsPageRes> pageNews(@Param("req") NewsPageReq req,
                               Page page);
}
